import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useConsultStore = defineStore(
	'consult',
	() => {
		const initalValue = ref({
			illnessDesc: '',
			illnessTime: '',
			consultFlag: '',
			pictures: [],
		})
		const illnessInfo = ref({ ...initalValue.value })
		const type = ref('')
		const illnessType = ref('')
		const depId = ref('')
		const patientId = ref('')
		return { initalValue, illnessInfo, type, illnessType, depId, patientId }
	},
	{
		persist: {
			paths: ['illnessInfo', 'type', 'illnessType', 'depId', 'patientId'],
		},
	}
)
